//
//  Common.swift
//  Weibo27
//
//  Created by apple on 16/4/16.
//  Copyright © 2016年 itcast. All rights reserved.
//
// 相当于我们OC 中的pch文件
import UIKit
// 表情键盘的删除按钮通知
let EmoticonDeleteButtonNSNotification = "EmoticonDeleteButtonNSNotification"

// 表情键盘的表情按钮通知
let EmoticonButtonNSNotification = "EmoticonButtonNSNotification"

// 切换根视图使用通知名字标识
let SwitchDefaultVcNSNotification = "SwitchDefaultVcNSNotification"
// 微博登陆需要的账号
let CZWeiboName = "jubeisi0516873@163.com"
let CZWeiboPasswd = "958794"

// 新浪微博需要的参数数据 
let APPKEY = "2502178694"
let APPSECRET = "cab21a615b11a37b9000c9082ddad03d"
let REDIRECT_URI = "http://www.baidu.com/"

// 屏幕的宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

// app主题颜色
let ThemeColor = UIColor.orangeColor()

// RGB颜色
func RGB(red red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}
// 随机颜色
func RandomColor() -> UIColor{

    // random() 有一个bug 每次程序启动起来后产生的随机数 都是相同
    let r = random() % 256
    let g = random() % 256
    let b = random() % 256
    return RGB(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}